import React, { Component } from 'React'
import { connect } from 'react-redux'
import { Row, Col, Card, Button, Spin } from 'antd'
import styles from './SearchContent.less'
import CustomComponent from '@/custom/CustomComponent'

class Users extends CustomComponent {
  render() {
    const { loading, show, list, select } = this.props.users
    console.log('users', list)
    return show ? (
      <div className={styles.content_outer}>
        <Spin spinning={loading}>
          <Card className={styles.real_content}>
            { list.map((item, index) => {
              return <Button key={index} className={styles.real_item}>{ item.screen_name }</Button>
            }) }
          </Card>
        </Spin>
      </div>
    ) : null
  }
}

const mapState = state => {
  const { users } = state.WeiboState
  return { users }
}

export default connect(mapState)(Users)
